import request from './request'
// 获取商品分类数据
export const getCateData = (querInfo) => request.get("categories",{params:querInfo})
// 获取父级分类的数据列表
export const parentCatList = () => request.get("categories", {params: { type: 2 }})
// 添加分类
export const addCat = (data) => request.post("categories", data)
// 删除分类
export const deleteCat = (id) => request.delete(`categories/${id}`)
// 回填
export const getByIdData = (id) => request.get(`categories/${id}`)
// 编辑修改分类
export const getByIdEditData = (id,data) => request.put(`categories/${id}`,data)